<%--<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html >
<html>
<head>
    <base href="${base}/"/>
    <title>后台管理</title>
    <meta charset="utf-8"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/admin.css"/>

</head>
<body>
<div class="container">
    <div id="header">
        <div class="logo">
            <a href=""><img src="shop/static/images/admin/logo.png" width="303" height="43" /></a>
        </div>
        <p>
            <a href="/shop/index">退出管理</a> <a href="/shop/admin/">后台首页</a> <a href="/shop/index" target='_blank'>商城首页</a>
            <span>您好 <label class='bold'>${sessionScope.manager.account}</label></span>
        </p>
    </div>

    <div id="admin_left">
        <ul class="submenu">
            <ul class="menu">
                <li><a href="shop/admin/category/add">增加类别</a></li>
                <li><a href="shop/admin/category/list">类别列表</a></li>
                <li><a href="shop/goods/add">增加商品</a></li>
<li><a href="shop/admin/user/list">用户列表</a></li>
                <li><a href="shop/admin/admin/list">管理员列表</a></li>
                <li><a href="shop/admin/goods/list">商品列表</a></li>
            </ul>
        </ul>
        <div id="copyright"></div>
    </div>

    <div id="admin_right" style="margin-top: 20px">
        <div class="content_box">

            <div class="content form_content">
                <form action="/shop/admin/category/add" method="post">
                    <table class="form_table" cellpadding="0" cellspacing="0">
                        <col width="150px"/>
                        <col/>
                        <tr>
                            <th>分类名称：</th>
                            <td><input class="normal" name="name" type="text"
                                       value=""><label>* 必选项</label></td>
                        </tr>
                        <tr>
                            <th>父分类：</th>
                            <td>
<%--                                <input class="normal" name="pid" type="text"--%>
<%--                                       value=""><label>* 必选项</label><--%>
                                <select name="pid" >
                                    <option value="">无</option>
                                    <c:forEach var="category" items="${categoryList}">
                                        <option value="${category.id}">${category.name}</option>
                                    </c:forEach>

                                </select>
                              <label>* 必选项</label>
                            </td>

                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <button class="submit" type="submit">
                                    <span>确 定</span>
                                </button>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>

    <c:if test="${msg!=null}">
        <div  class="meg" id="tempMsg" style="margin-left: 50px">
            <h2 style="color: red">${msg}</h2>
        </div>
    </c:if>
    <div id="separator"></div>
</div>

<script>
    // 2秒后隐藏消息
    setTimeout(function() {
        document.getElementById('tempMsg').style.display = 'none';
    }, 2000); // 2000毫秒 = 2秒
</script>
</body>
</html>
